package com.martin.dms.factories.hib;

import com.martin.dms.factories.ClientFactory;
import com.martin.dms.model.Client;
import com.martin.dms.model.hib.ClientHib;

/**
 * Hibernate implementation for the Client factory.
 * 
 * @author mtsvetkov
 */
public class ClientFactoryHib implements ClientFactory {

    /**
     * {@inheritDoc}
     */
    public Client create(String firstName, String lastName, String username, String password, String email) {
        ClientHib client = new ClientHib();
        client.setFirstName(firstName);
        client.setLastName(lastName);
        client.setUsername(username);
        client.setPassword(password);
        client.setEmail(email);
        return client;
    }

    /**
     * {@inheritDoc}
     */
    public Client create(String firstName, String lastName, String username, String password, String email,
            String address, String phoneNumber) {
        ClientHib client = new ClientHib();
        client.setFirstName(firstName);
        client.setLastName(lastName);
        client.setUsername(username);
        client.setPassword(password);
        client.setEmail(email);
        client.setAddress(address);
        client.setPhoneNumber(phoneNumber);
        return client;
    }

}
